package com.ophiux.common.swagger.annotation;

import com.ophiux.common.swagger.config.SwaggerAutoConfiguration;
import com.ophiux.common.swagger.support.SwaggerProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Import;
import springfox.documentation.oas.annotations.EnableOpenApi;

import java.lang.annotation.*;

/**
 * @desc: 自定义swagger注解(跟spring.factories注入任选其一)
 * @author: hhl
 * @date：2022/7/4 13:46
 * @EnableOpenApi 开启swagger3的注解
 * @EnableConfigurationProperties 此注解是为了扫描不到com.ophiux.common.swagger.support.SwaggerProperties注解时，能自动注入容器
 */
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@EnableOpenApi
@EnableConfigurationProperties(SwaggerProperties.class)
@Import({SwaggerAutoConfiguration.class})
public @interface EnableSwagger3 {

}